//
//  AuthenImgsTableViewCell.m
//  LPTClient
//
//  Created by apple on 2018/12/12.
//  Copyright © 2018 zhaodd. All rights reserved.
//

#import "AuthenImgsTableViewCell.h"
@interface AuthenImgsTableViewCell()

@property (nonatomic, copy) NSArray *imgArray;
@property (nonatomic, copy) NSArray *titleArray;

@end

@implementation AuthenImgsTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    
    self.imgArray = @[self.imageView1,self.imageView2,self.imageView3,self.imageView4,self.imageView5,self.imageView6];
    self.titleArray = @[self.lab1,self.lab2,self.lab3,self.lab4,self.lab5,self.lab6];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)resetAllImgs
{
    self.imageView1.hidden = YES;
    self.imageView2.hidden = YES;
    self.imageView3.hidden = YES;
    self.imageView4.hidden = YES;
    self.imageView5.hidden = YES;
    self.imageView6.hidden = YES;
    
    self.lab1.hidden = YES;
    self.lab2.hidden = YES;
    self.lab3.hidden = YES;
    self.lab4.hidden = YES;
    self.lab5.hidden = YES;
    self.lab6.hidden = YES;
    
}

- (void)refreshImages:(NSArray *)arr
{
    //[self resetAllImgs];
    for (int i=0;i<arr.count ; i++) {
        ImageInfo *imgInfo = arr[i];
        UIImageView *imageView = self.imgArray[i];
        UILabel *label = self.titleArray[i];
        imageView.hidden = NO;
        label.hidden = NO;
        
        NSString *url = IMG_URL(imgInfo.url);
        [imageView setImageURL:[NSURL URLWithString:url]];
    }
}

@end
